<template>
    <div class="nav-bar">
        <van-nav-bar :title="(route.meta.title as string)" left-text="返回" left-arrow @click-left="handleBack"></van-nav-bar>
    </div>
</template>

<script lang="ts" setup>
import { useRouter, useRoute } from 'vue-router'

const router = useRouter()

const route = useRoute()

const handleBack = () => router.back()

</script>

<style lang="less" scoped>
:deep(.van-nav-bar__content) {
    background-color: rgb(142, 197, 252);
}
:deep(.van-nav-bar__text){
    color: red;
    font-weight: bold;
}
</style>
